package com.unohacha.qqj.fzdr.main;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.unohacha.qqj.fzdr.R;
import com.unohacha.qqj.fzdr.SupplyDemandTypeActivity;
import com.unohacha.qqj.mylibrary.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 添加图标
 */
public class AddActivity extends BaseActivity {
    @BindView(R.id.add_supply_pulish)
    TextView addSupplyPulish;
    @BindView(R.id.add_request_pulish)
    TextView addRequestPulish;
    @BindView(R.id.add_cancle)
    ImageView addCancle;
//    private Unbinder unbinder;

//    @Override
//    protected void onCreate(@Nullable Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
////        setFullScreen();
//        setContentView(R.layout.activity_add_layout);
//        unbinder = ButterKnife.bind(this);
//    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_add_layout;
    }


//    private void setFullScreen() {
//        Window window = getWindow();
//        //定义全屏参数
//        int flag = WindowManager.LayoutParams.FLAG_FULLSCREEN;
//        //设置当前窗体为全屏显示
//        window.addFlags(flag);
//    }

    @OnClick({R.id.add_supply_pulish, R.id.add_request_pulish, R.id.add_cancle})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.add_supply_pulish:
                Intent intent1 = new Intent(this, SupplyDemandTypeActivity.class);
                intent1.putExtra("type","1");
                startActivity(intent1);
                finish();
                break;
            case R.id.add_request_pulish:
                Intent intent2 = new Intent(this, SupplyDemandTypeActivity.class);
                intent2.putExtra("type","2");
                startActivity(intent2);
                finish();
                break;
            case R.id.add_cancle:
                finish();
                break;
        }
    }

//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        if (unbinder != null) {
//            unbinder.unbind();
//        }
//    }
}
